<template>

  <div class="zhanshi">

    <!-- top -->
    <div class="top">
      <div class="top-left">
        <pie-chart v-if="flag" width="100%" height="352px" :params="params2" />
      </div>
      <div class="top-right">
        <div class="header">
          <span>序号</span>
          <span>学生姓名</span>
          <span>时间完成率</span>
          <span>内容完成率</span>
        </div>
        <div class="h-item">
          <span>1</span>
          <span>张挑挑</span>
          <span>80%</span>
          <span>80%</span>
        </div>
        <div class="h-item">
          <span>2</span>
          <span>张挑挑</span>
          <span>80%</span>
          <span>80%</span>
        </div>
        <div class="h-item">
          <span>3</span>
          <span>张挑挑</span>
          <span>80%</span>
          <span>80%</span>
        </div>
        <div class="h-item">
          <span>4</span>
          <span>张挑挑</span>
          <span>80%</span>
          <span>80%</span>
        </div>
        <div class="h-item">
          <span>5</span>
          <span>张挑挑</span>
          <span>80%</span>
          <span>80%</span>
        </div>
      </div>
    </div>
  </div>

</template>

<script>
import PieChart from './PieChart.vue'
export default {
  name: 'NeiRong',
  components: {
    PieChart
  },
  data() {
    return {
      flag: false,
      params2: {
        title: '作业内容完成率'

      }
    }
  },
  mounted() {
  },
  methods: {

  }
}
</script>

<style lang="scss" scoped>
.zhanshi{
  // padding: 30rpx;
  .top{
    overflow: hidden;
    padding-left: 25px;
    padding-bottom: 40px;
    .top-left{
      float: left;
      // width: calc(100% );
      width: calc(100% - 400px);
    }
    .top-right{
      width: 400px;
      float: left;
      .header{
        margin-top: 20px;
        font-weight: bold;
        overflow: hidden;
        span{

          margin-right: 10px;
          width: 20%;
          text-align: center;
          float: left;
          color: rgba(0, 0, 0, 0.85);
          font-size: 14px;

        }
      }
      .h-item{
        margin-top: 36px;
        overflow: hidden;
        span{
          width: 20%;
          padding:0 2.5%;
          text-align: center;
          float: left;
          color: rgba(0, 0, 0, 0.65);
          font-size: 14px;
          border-right: 1px solid rgba(217, 217, 217, 1);
          // &:first-of-type{
          //   position: relative;
          //   &::after{
          //     display: block;
          //     position: absolute;
          //     left: 0;
          //     top: 0;
          //     content: "";
          //     width: 16px;
          //     height: 16px;
          //     background-color: #637ff9;
          //   }
          // }
          &:nth-of-type(2){
            margin-left: 10px;
          }
          &:nth-of-type(3){
            margin-left: 10px;
          }
          &:nth-of-type(4){
            margin-left: 10px;
            border-right: 1px solid transparent;
          }
        }
      }
      .h-item:nth-child(3){
        span:first-of-type{
          &::after{
            background-color: #3aa0ff;
          }
        }
      }
      .h-item:nth-child(4){
        span:first-of-type{
          &::after{
            background-color: #5dd39a;
          }
        }
      }
      .h-item:nth-child(5){
        span:first-of-type{
          &::after{
            background-color: #f8c026;
          }
        }
      }
      .h-item:nth-child(6){
        span:first-of-type{
          &::after{
            background-color: #f5486a;
          }
        }
      }
    }
  }
}

// }
</style>
